<h3>Sửap phòng máy</h3>
<br />
<form action="" method="post" style="width: 50%;padding-left: 50px">
<?php
echo form_label('Phòng máy','pm');
$listpm_dropdown = array();
if(!empty($listpm)){
    foreach($listpm as $kpm=>$pm_){
        $listpm_dropdown[$kpm] = $pm_;
    }
}
echo form_dropdown('pm',$listpm_dropdown,$this->input->post('pm'),'class="f_input"'); 

echo form_label('Tên máy','tenmt');
echo form_input(array(
    'name' => 'tenmt',
    'id' => 'tenmt',
    'value' =>$this->input->post('tenmt'),
    'class' =>'f_input'
)); 


if(!empty($listllkmt)){
    foreach($listllkmt as $vllk=>$llk){
        echo form_label($llk,'tenmt');
        
        if(!empty($listltmt[$vllk])){
            $list_drop = array();
            foreach($listltmt[$vllk] as $drop){
                $list_drop[$drop->id] = $drop->ten;
            }
            echo form_dropdown($vllk,$list_drop,'','class="f_input"'); 
        }
        else echo form_dropdown($vllk,array(),'','class="f_input"'); 
        /*
        
        echo form_input(array(
            'name' => 'tenmt',
            'id' => 'tenmt',
            'value' =>$this->input->post('tenmt'),
            'class' =>'f_input'
        )); */
    }
}




?>
<span class="field_error" id="error_tenmt"></span>

<br /><?php
echo form_button(array(
    'id' => 'submit',
    'content' => 'Sửa'
));
?>
</form>
